#ifndef _POLL
#define _POLL
#include"Task_queue.hh"
#include<vector>
#include<thread>
#include<functional>


using Task =std::function<void()>;
//进程池的类
class ThreadPool
{
public:
    ThreadPool(size_t capa, size_t num);
    void addTask(Task &&rhs);
    void dowork();
    void start();
    void stop();
    void wakeup();
    //成员函数
private:
    //线程数量
    size_t _capa;
    std::vector<std::thread> _thread;
    size_t _queuenum;
   Taskqueue _queue;
   bool _isexit;

    //数据成员
};
#endif 
